// INFO: Headers from the standard library should be inserted at the top via
#include <cmath>

// daily_rate calculates the daily rate given an hourly rate
double daily_rate(double hourly_rate) {
    // TODO: Implement a function to calculate the daily rate given an hourly
    // rate
    return 8 * hourly_rate;
}

// apply_discount calculates the price after a discount
double apply_discount(double before_discount, double discount) {
    // TODO: Implement a function to calculate the price after a discount.
    return before_discount / 100.0 * (100.0 - discount);
}

// monthly_rate calculates the monthly rate, given an hourly rate and a discount
// The returned monthly rate is rounded up to the nearest integer.
int monthly_rate(double hourly_rate, double discount) {
    // TODO: Implement a function to calculate the monthly rate, and apply a
    // discount.
    return std::ceil(apply_discount(daily_rate(hourly_rate) * 22, discount));
    // std::ceil imported from cmath lib
}

// days_in_budget calculates the number of workdays given a budget, hourly rate,
// and discount The returned number of days is rounded down (take the floor) to
// the next integer.
int days_in_budget(int budget, double hourly_rate, double discount) {
    // TODO: Implement a function that takes a budget, an hourly rate, and a
    // discount, and calculates how many complete days of work that covers.
    int floored_day = budget / apply_discount(daily_rate(hourly_rate), discount);
    return floored_day;
}

int dec_base10{9241};              // base 10: 0-9
int hex_base16{0x24CD};              // base 16: 0-9 and A-F. NOTE: begin with 0x
int bin_base2{0b10010000011001};   // base  2: 0-1 NOTE: begin with 0b
int oct_base8{022031};             // base  8: 0-7 NOTE: begin with 0

int dec_readable{123'233'900}; // can add separator in number to help human read long number
int dec_readable{1'2323'3900}; // does not affect read value and is total arbitrary